package com.tcc.etec.mecashow.listener;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.Toast;

import com.tcc.etec.mecashow.R;
import com.tcc.etec.mecashow.activity.ControlePerguntasActivity;
import com.tcc.etec.mecashow.activity.RecordesActivity;

public class ControleTelaPrincipal implements OnClickListener, OnCheckedChangeListener {

	private Activity context;
	
	public ControleTelaPrincipal(Activity activity) {
		super();
		this.context = activity;
	}

	@Override
	public void onClick(View view) { 
		switch (view.getId ()) {
		case R.id.botaoJogar:
			Intent intent = new Intent(context, ControlePerguntasActivity.class);	
			context.startActivity(intent);
			break;
		case R.id.botaoRecordes:
			Intent intentr = new Intent(context, RecordesActivity.class);
			context.startActivity(intentr);
			break;
		
		default:
			break;
		}
		
	}

	@Override
	public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
		if(isChecked){
			Toast.makeText(context, "Som Ligado", Toast.LENGTH_SHORT).show();
		}else{
			Toast.makeText(context, "Som Desligado", Toast.LENGTH_SHORT).show();
		}
	}

}
